home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1996-06-21 | 1.9 KB | 77 lines | [TEXT/MEDT] |
- DEFINITION MODULE MatSclOps;
-
- (*******************************************************************
-
- Module MatSclOps (Version 1.0)
-
- Copyright ©1993 by Olivier Roth, Andreas Fischlin,
- and Swiss Federal Institute of Technology Zürich ETHZ
-
- Purpose: provides some simple matrix operations, like
- addition, subtraction, multiplication.
-
- Remarks: for real matrix operations see MatrixVecOps
-
- This modulde is part of the Mat-library, which forms
- part of the RAMSES package.
-
- Programming
-
- o Design and Implementation
- O. Roth 15.11.89
- A. Fischlin 28/05/93
-
-
- Systems Ecology Group
- Swiss Federal Institute of Technology Zurich ETHZ
- Department of Environmental Sciences
- Grabenstr. 3
- CH-8952 Schlieren/Zurich
- Switzerland
-
- Last revision of definition: 28/05/93 af
-
- *******************************************************************)
-
- FROM Matrices IMPORT Matrix;
-
-
- VAR
- matrixSclOpsOk: BOOLEAN; (* returns success of operation *)
-
-
- PROCEDURE AddVecToMatrixRow( v: Matrix;
- m: Matrix; irow: INTEGER );
-
- PROCEDURE AddVecToMatrixCol( v: Matrix;
- m: Matrix; icol: INTEGER );
-
-
- PROCEDURE ColSum ( a: Matrix; VAR rowVec: Matrix );
-
- PROCEDURE RowSum ( a: Matrix; VAR colVec: Matrix );
-
- PROCEDURE TotSum ( a: Matrix ): REAL;
-
-
- PROCEDURE DiagVec ( a: Matrix; VAR r: Matrix );
-
- PROCEDURE DiagSum ( a: Matrix ): REAL;
-
- PROCEDURE DiagProd( a: Matrix ): REAL;
-
-
- PROCEDURE EqualMatrix( a, b: Matrix; maxErr: REAL ): BOOLEAN;
-
-
- PROCEDURE ScalarMul( a: Matrix; scal: REAL );
-
- PROCEDURE ScalarDiv( a: Matrix; scal: REAL );
-
-
- PROCEDURE ScalarVecProd( a, b: Matrix ): REAL;
- (* a and b must have dimensions 1 x n and n x 1 resp. *)
-
-
- END MatSclOps.
-